(0) Obligation:

Clauses:

ordered([]).
ordered(.(X, [])).
ordered(.(X, .(Y, Xs))) :- ','(le(X, Y), ordered(.(Y, Xs))).
le(s(X), s(Y)) :- le(X, Y).
le(0, s(0)).
le(0, 0).

Query: ordered(g)

(1) PrologToDTProblemTransformerProof (SOUND transformation)

Built DT problem from termination graph DT10.

(2) Obligation:

Triples:

leB(s(X1), s(X2)) :- leB(X1, X2).
orderedA(.(s(X1), .(s(X2), X3))) :- leB(X1, X2).
orderedA(.(s(X1), .(s(X2), X3))) :- ','(lecB(X1, X2), orderedA(.(s(X2), X3))).
orderedA(.(0, .(s(0), X1))) :- orderedA(.(s(0), X1)).
orderedA(.(0, .(0, X1))) :- orderedA(.(0, X1)).

Clauses:

orderedcA([]).
orderedcA(.(X1, [])).
orderedcA(.(s(X1), .(s(X2), X3))) :- ','(lecB(X1, X2), orderedcA(.(s(X2), X3))).
orderedcA(.(0, .(s(0), X1))) :- orderedcA(.(s(0), X1)).
orderedcA(.(0, .(0, X1))) :- orderedcA(.(0, X1)).
lecB(s(X1), s(X2)) :- lecB(X1, X2).
lecB(0, s(0)).
lecB(0, 0).

Afs:

orderedA(x1)  =  orderedA(x1)

(3) TriplesToPiDPProof (SOUND transformation)

We use the technique of [DT09]. With regard to the inferred argument filtering the predicates were used in the following modes:
orderedA_in: (b)
leB_in: (b,b)
lecB_in: (b,b)
Transforming TRIPLES into the following Term Rewriting System:
Pi DP problem:
The TRS P consists of the following rules:

ORDEREDA_IN_G(.(s(X1), .(s(X2), X3))) → U2_G(X1, X2, X3, leB_in_gg(X1, X2))
ORDEREDA_IN_G(.(s(X1), .(s(X2), X3))) → LEB_IN_GG(X1, X2)
LEB_IN_GG(s(X1), s(X2)) → U1_GG(X1, X2, leB_in_gg(X1, X2))
LEB_IN_GG(s(X1), s(X2)) → LEB_IN_GG(X1, X2)
ORDEREDA_IN_G(.(s(X1), .(s(X2), X3))) → U3_G(X1, X2, X3, lecB_in_gg(X1, X2))
U3_G(X1, X2, X3, lecB_out_gg(X1, X2)) → U4_G(X1, X2, X3, orderedA_in_g(.(s(X2), X3)))
U3_G(X1, X2, X3, lecB_out_gg(X1, X2)) → ORDEREDA_IN_G(.(s(X2), X3))
ORDEREDA_IN_G(.(0, .(s(0), X1))) → U5_G(X1, orderedA_in_g(.(s(0), X1)))
ORDEREDA_IN_G(.(0, .(s(0), X1))) → ORDEREDA_IN_G(.(s(0), X1))
ORDEREDA_IN_G(.(0, .(0, X1))) → U6_G(X1, orderedA_in_g(.(0, X1)))
ORDEREDA_IN_G(.(0, .(0, X1))) → ORDEREDA_IN_G(.(0, X1))

The TRS R consists of the following rules:

lecB_in_gg(s(X1), s(X2)) → U12_gg(X1, X2, lecB_in_gg(X1, X2))
lecB_in_gg(0, s(0)) → lecB_out_gg(0, s(0))
lecB_in_gg(0, 0) → lecB_out_gg(0, 0)
U12_gg(X1, X2, lecB_out_gg(X1, X2)) → lecB_out_gg(s(X1), s(X2))

Pi is empty.
We have to consider all (P,R,Pi)-chains

Infinitary Constructor Rewriting Termination of PiDP implies Termination of TRIPLES

(4) Obligation:

Pi DP problem:
The TRS P consists of the following rules:

ORDEREDA_IN_G(.(s(X1), .(s(X2), X3))) → U2_G(X1, X2, X3, leB_in_gg(X1, X2))
ORDEREDA_IN_G(.(s(X1), .(s(X2), X3))) → LEB_IN_GG(X1, X2)
LEB_IN_GG(s(X1), s(X2)) → U1_GG(X1, X2, leB_in_gg(X1, X2))
LEB_IN_GG(s(X1), s(X2)) → LEB_IN_GG(X1, X2)
ORDEREDA_IN_G(.(s(X1), .(s(X2), X3))) → U3_G(X1, X2, X3, lecB_in_gg(X1, X2))
U3_G(X1, X2, X3, lecB_out_gg(X1, X2)) → U4_G(X1, X2, X3, orderedA_in_g(.(s(X2), X3)))
U3_G(X1, X2, X3, lecB_out_gg(X1, X2)) → ORDEREDA_IN_G(.(s(X2), X3))
ORDEREDA_IN_G(.(0, .(s(0), X1))) → U5_G(X1, orderedA_in_g(.(s(0), X1)))
ORDEREDA_IN_G(.(0, .(s(0), X1))) → ORDEREDA_IN_G(.(s(0), X1))
ORDEREDA_IN_G(.(0, .(0, X1))) → U6_G(X1, orderedA_in_g(.(0, X1)))
ORDEREDA_IN_G(.(0, .(0, X1))) → ORDEREDA_IN_G(.(0, X1))

The TRS R consists of the following rules:

lecB_in_gg(s(X1), s(X2)) → U12_gg(X1, X2, lecB_in_gg(X1, X2))
lecB_in_gg(0, s(0)) → lecB_out_gg(0, s(0))
lecB_in_gg(0, 0) → lecB_out_gg(0, 0)
U12_gg(X1, X2, lecB_out_gg(X1, X2)) → lecB_out_gg(s(X1), s(X2))

Pi is empty.
We have to consider all (P,R,Pi)-chains

(5) DependencyGraphProof (EQUIVALENT transformation)

The approximation of the Dependency Graph [LOPSTR] contains 3 SCCs with 7 less nodes.

(6) Complex Obligation (AND)

(7) Obligation:

Pi DP problem:
The TRS P consists of the following rules:

LEB_IN_GG(s(X1), s(X2)) → LEB_IN_GG(X1, X2)

The TRS R consists of the following rules:

lecB_in_gg(s(X1), s(X2)) → U12_gg(X1, X2, lecB_in_gg(X1, X2))
lecB_in_gg(0, s(0)) → lecB_out_gg(0, s(0))
lecB_in_gg(0, 0) → lecB_out_gg(0, 0)
U12_gg(X1, X2, lecB_out_gg(X1, X2)) → lecB_out_gg(s(X1), s(X2))

Pi is empty.
We have to consider all (P,R,Pi)-chains

(8) UsableRulesProof (EQUIVALENT transformation)

For (infinitary) constructor rewriting [LOPSTR] we can delete all non-usable rules from R.

(9) Obligation:

Pi DP problem:
The TRS P consists of the following rules:

LEB_IN_GG(s(X1), s(X2)) → LEB_IN_GG(X1, X2)

R is empty.
Pi is empty.
We have to consider all (P,R,Pi)-chains

(10) PiDPToQDPProof (EQUIVALENT transformation)

Transforming (infinitary) constructor rewriting Pi-DP problem [LOPSTR] into ordinary QDP problem [LPAR04] by application of Pi.

(11) Obligation:

Q DP problem:
The TRS P consists of the following rules:

LEB_IN_GG(s(X1), s(X2)) → LEB_IN_GG(X1, X2)

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.

(12) QDPSizeChangeProof (EQUIVALENT transformation)

By using the subterm criterion [SUBTERM_CRITERION] together with the size-change analysis [AAECC05] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:

  • LEB_IN_GG(s(X1), s(X2)) → LEB_IN_GG(X1, X2)
    The graph contains the following edges 1 > 1, 2 > 2

(13) YES

(14) Obligation:

Pi DP problem:
The TRS P consists of the following rules:

ORDEREDA_IN_G(.(s(X1), .(s(X2), X3))) → U3_G(X1, X2, X3, lecB_in_gg(X1, X2))
U3_G(X1, X2, X3, lecB_out_gg(X1, X2)) → ORDEREDA_IN_G(.(s(X2), X3))

The TRS R consists of the following rules:

lecB_in_gg(s(X1), s(X2)) → U12_gg(X1, X2, lecB_in_gg(X1, X2))
lecB_in_gg(0, s(0)) → lecB_out_gg(0, s(0))
lecB_in_gg(0, 0) → lecB_out_gg(0, 0)
U12_gg(X1, X2, lecB_out_gg(X1, X2)) → lecB_out_gg(s(X1), s(X2))

Pi is empty.
We have to consider all (P,R,Pi)-chains

(15) PiDPToQDPProof (EQUIVALENT transformation)

Transforming (infinitary) constructor rewriting Pi-DP problem [LOPSTR] into ordinary QDP problem [LPAR04] by application of Pi.

(16) Obligation:

Q DP problem:
The TRS P consists of the following rules:

ORDEREDA_IN_G(.(s(X1), .(s(X2), X3))) → U3_G(X1, X2, X3, lecB_in_gg(X1, X2))
U3_G(X1, X2, X3, lecB_out_gg(X1, X2)) → ORDEREDA_IN_G(.(s(X2), X3))

The TRS R consists of the following rules:

lecB_in_gg(s(X1), s(X2)) → U12_gg(X1, X2, lecB_in_gg(X1, X2))
lecB_in_gg(0, s(0)) → lecB_out_gg(0, s(0))
lecB_in_gg(0, 0) → lecB_out_gg(0, 0)
U12_gg(X1, X2, lecB_out_gg(X1, X2)) → lecB_out_gg(s(X1), s(X2))

The set Q consists of the following terms:

lecB_in_gg(x0, x1)
U12_gg(x0, x1, x2)

We have to consider all (P,Q,R)-chains.

(17) MRRProof (EQUIVALENT transformation)

By using the rule removal processor [LPAR04] with the following ordering, at least one Dependency Pair or term rewrite system rule of this QDP problem can be strictly oriented.

Strictly oriented rules of the TRS R:

lecB_in_gg(0, s(0)) → lecB_out_gg(0, s(0))
lecB_in_gg(0, 0) → lecB_out_gg(0, 0)

Used ordering: Polynomial interpretation [POLO]:

POL(.(x1, x2)) = 1 + 2·x1 + 2·x2   
POL(0) = 0   
POL(ORDEREDA_IN_G(x1)) = x1   
POL(U12_gg(x1, x2, x3)) = x1 + x2 + x3   
POL(U3_G(x1, x2, x3, x4)) = 1 + x1 + 2·x2 + 2·x3 + 2·x4   
POL(lecB_in_gg(x1, x2)) = 1 + x1 + x2   
POL(lecB_out_gg(x1, x2)) = x1 + x2   
POL(s(x1)) = 2·x1   

(18) Obligation:

Q DP problem:
The TRS P consists of the following rules:

ORDEREDA_IN_G(.(s(X1), .(s(X2), X3))) → U3_G(X1, X2, X3, lecB_in_gg(X1, X2))
U3_G(X1, X2, X3, lecB_out_gg(X1, X2)) → ORDEREDA_IN_G(.(s(X2), X3))

The TRS R consists of the following rules:

lecB_in_gg(s(X1), s(X2)) → U12_gg(X1, X2, lecB_in_gg(X1, X2))
U12_gg(X1, X2, lecB_out_gg(X1, X2)) → lecB_out_gg(s(X1), s(X2))

The set Q consists of the following terms:

lecB_in_gg(x0, x1)
U12_gg(x0, x1, x2)

We have to consider all (P,Q,R)-chains.

(19) MRRProof (EQUIVALENT transformation)

By using the rule removal processor [LPAR04] with the following ordering, at least one Dependency Pair or term rewrite system rule of this QDP problem can be strictly oriented.
Strictly oriented dependency pairs:

U3_G(X1, X2, X3, lecB_out_gg(X1, X2)) → ORDEREDA_IN_G(.(s(X2), X3))


Used ordering: Polynomial interpretation [POLO]:

POL(.(x1, x2)) = x1 + x2   
POL(ORDEREDA_IN_G(x1)) = 2·x1   
POL(U12_gg(x1, x2, x3)) = x1 + 2·x2 + x3   
POL(U3_G(x1, x2, x3, x4)) = 2·x1 + 2·x2 + 2·x3 + x4   
POL(lecB_in_gg(x1, x2)) = 2·x1 + 2·x2   
POL(lecB_out_gg(x1, x2)) = 2 + x1 + 2·x2   
POL(s(x1)) = 2·x1   

(20) Obligation:

Q DP problem:
The TRS P consists of the following rules:

ORDEREDA_IN_G(.(s(X1), .(s(X2), X3))) → U3_G(X1, X2, X3, lecB_in_gg(X1, X2))

The TRS R consists of the following rules:

lecB_in_gg(s(X1), s(X2)) → U12_gg(X1, X2, lecB_in_gg(X1, X2))
U12_gg(X1, X2, lecB_out_gg(X1, X2)) → lecB_out_gg(s(X1), s(X2))

The set Q consists of the following terms:

lecB_in_gg(x0, x1)
U12_gg(x0, x1, x2)

We have to consider all (P,Q,R)-chains.

(21) DependencyGraphProof (EQUIVALENT transformation)

The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 0 SCCs with 1 less node.

(22) TRUE

(23) Obligation:

Pi DP problem:
The TRS P consists of the following rules:

ORDEREDA_IN_G(.(0, .(0, X1))) → ORDEREDA_IN_G(.(0, X1))

The TRS R consists of the following rules:

lecB_in_gg(s(X1), s(X2)) → U12_gg(X1, X2, lecB_in_gg(X1, X2))
lecB_in_gg(0, s(0)) → lecB_out_gg(0, s(0))
lecB_in_gg(0, 0) → lecB_out_gg(0, 0)
U12_gg(X1, X2, lecB_out_gg(X1, X2)) → lecB_out_gg(s(X1), s(X2))

Pi is empty.
We have to consider all (P,R,Pi)-chains

(24) UsableRulesProof (EQUIVALENT transformation)

For (infinitary) constructor rewriting [LOPSTR] we can delete all non-usable rules from R.

(25) Obligation:

Pi DP problem:
The TRS P consists of the following rules:

ORDEREDA_IN_G(.(0, .(0, X1))) → ORDEREDA_IN_G(.(0, X1))

R is empty.
Pi is empty.
We have to consider all (P,R,Pi)-chains

(26) PiDPToQDPProof (EQUIVALENT transformation)

Transforming (infinitary) constructor rewriting Pi-DP problem [LOPSTR] into ordinary QDP problem [LPAR04] by application of Pi.

(27) Obligation:

Q DP problem:
The TRS P consists of the following rules:

ORDEREDA_IN_G(.(0, .(0, X1))) → ORDEREDA_IN_G(.(0, X1))

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.

(28) QDPSizeChangeProof (EQUIVALENT transformation)

By using the subterm criterion [SUBTERM_CRITERION] together with the size-change analysis [AAECC05] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:

  • ORDEREDA_IN_G(.(0, .(0, X1))) → ORDEREDA_IN_G(.(0, X1))
    The graph contains the following edges 1 > 1

(29) YES